package com.jymj.enumEntity;

/**
 * Created by ljj on 2018/5/30. 水源工程 步骤
 */
public enum WarterProEnum {
    zero("开工", 1),
    one("材料进场", 2),
    two("测量防线", 3),
    three("钻孔", 4),
    four("下井管", 5),
    five("洗井", 6),
    six("抽水试验", 7),
    seven("井台", 8),
    eight("水泵安装", 9),
    nine("验收", 10),;

    // 成员变量
    private String name;
    private int index;

    // 构造方法
    private WarterProEnum(String name, int index) {
        this.name = name;
        this.index = index;
    }

    // 普通方法
    public static String getName(int index) {
        for (WarterProEnum s : WarterProEnum.values()) {
            if (s.getIndex() == index) {
                return s.name;
            }
        }
        return null;
    }

    // get set 方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }
}
